/**上传文件*/
$("#image_upload").uploadifive({
			'buttonText' : '请选择',
			'height' : 30,
			'uploadScript' : 'upload/submit.do',
			//上传文件类型编码，具体可见 http://www.cnblogs.com/anllin/articles/1994485.html
			'fileType' : 'image',
			'width' : 120,
			'auto' : true,//设置选择文件后是否自动上传
			'removeCompleted' : false,
			'fileObjName' : 'file',
			'onUploadComplete' : function(file, data) {
				var data = eval("(" + data + ")");
				if (data.success) {
					alert(data.msg);
					$("input[name='image_name']").val(data.result);
				} else {
					$.messager.alert('提示','<strong><center>'+data.msg+'</center></strong>');
				}
			}
});
$("#loc_sub_btn").click(function(){
	$("#loc_order_form").form('submit', {    
		url:'customer/overseas_business/subLocalDis.do',   
	    onSubmit: function(){//发送前操作
	    	var isValid = $(this).form('validate');
			return isValid;	// 返回false终止表单提交
	    },    
	    success:function(data) {
	    	var data = eval('(' + data + ')');  
		        if(data.success == true){
		        	$.messager.alert('提示','<strong><center>'+data.msg+'</center></strong>');
		        	$("#loc_order_form :input").val('');
		        }else{    
		        	$.messager.alert('警告','<strong><center>'+data.msg+'</center></strong>');    
		        } 
		        if($('#tabs').tabs('exists',"我的本地配送订单")==true){
		        	$("#local_order_datagrid").datagrid('reload');
					$("#local_order_datagrid").datagrid('uncheckAll');
		    	}
		     }  
	});  
});

